/*
*  Copyright (c) 2010-2023
*/
package net.siufung.market.base.app.controller.model.appMenu;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.siufung.core.model.AbstractDto;
import net.siufung.core.utils.CopyUtil;
import net.siufung.market.base.app.mapper.entity.AppMenu;

import javax.validation.constraints.NotNull;

/**
 * 系统应用菜单表 创建传参对象
 *
 * @author 陈建峰
 * @since 2023-07-16 17:45:10
 * @version 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="AppMenuSaveDto", description="系统应用菜单表创建传参对象")
public class AppMenuSaveDto extends AbstractDto {

    private static final long serialVersionUID = 1L;

    /**
     * 应用id
     */
    @ApiModelProperty(value = "应用id")
    @NotNull(message = "应用id不能为空!")
    private Integer appId;

    /**
     * 菜单id
     */
    @ApiModelProperty(value = "菜单id")
    @NotNull(message = "菜单id不能为空!")
    private Integer menuId;


    public AppMenu to(){
        AppMenu sysAppMenu = new AppMenu();
        CopyUtil.copyProperties(this, sysAppMenu);
        return sysAppMenu;
    }

}